package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendanceMonthlyAddDTO;
import org.jsola.hr.dto.EmpSocChangesAddDTO;
import org.jsola.hr.dto.EmpSocChangesUpdateDTO;
import org.jsola.hr.query.EmpSocChangesQuery;
import org.jsola.hr.vo.EmpSocChangesListVO;
import org.jsola.hr.vo.EmpSocChangesVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工社保公积金调整记录")
public interface IEmpSocChangesControllerAPI {

    /**
     * 新增员工社保公积金调整记录
     * @param empSocChangesAddDTO 员工社保公积金调整记录新增实体
     * @return 员工社保公积金调整记录展示对象
     */
    @ApiOperation(value = "新增员工社保公积金调整记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesAddDTO", dataType = "EmpSocChangesAddDTO", value = "新增员工社保公积金调整记录", paramType = "body")
    })
    Result<EmpSocChangesVO> save(EmpSocChangesAddDTO empSocChangesAddDTO);


    /**
     * 修改员工社保公积金调整记录
     * @param empSocChangesUpdateDTO 员工社保公积金调整记录
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工社保公积金调整记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesUpdateDTO", dataType = "EmpSocChangesUpdateDTO", value = "修改员工社保公积金调整记录", paramType = "body")
    })
    Result<Integer> update(EmpSocChangesUpdateDTO empSocChangesUpdateDTO);




    /**
     * 删除单个员工社保公积金调整记录，彻底删除
     * @param empSocChangesId 员工社保公积金调整记录id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工社保公积金调整记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesId", dataType = "String", value = "员工社保公积金调整记录id", paramType = "path")
    })
    Result<Integer> delete(String empSocChangesId);


    /**
     * 批量删除员工社保公积金调整记录，彻底删除
     * @param empSocChangesIds 员工社保公积金调整记录id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工社保公积金调整记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesIds", dataType = "String[]", value = "员工社保公积金调整记录id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empSocChangesIds);


    /**
     * 根据员工社保公积金调整记录id查询员工社保公积金调整记录详情
     * @param empSocChangesId 员工社保公积金调整记录id
     * @return 员工社保公积金调整记录详情
     */
    @ApiOperation(value="根据员工社保公积金调整记录id查询员工社保公积金调整记录详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesId", dataType = "String", value = "员工社保公积金调整记录id", paramType = "path")
    })
    Result<EmpSocChangesVO> findById(String empSocChangesId);


    /**
     * 查询员工社保公积金调整记录
     * @param empSocChangesQuery 员工社保公积金调整记录查询参数
     * @return page
     */
    @ApiOperation(value="查询员工社保公积金调整记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesQuery", dataType = "EmpSocChangesQuery", value = "员工社保公积金调整记录查询参数", paramType = "query")
    })
    Result<List<EmpSocChangesListVO>> listAll(EmpSocChangesQuery empSocChangesQuery);


     /**
     * 分页查询员工社保公积金调整记录
     * @param empSocChangesQuery 员工社保公积金调整记录查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工社保公积金调整记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocChangesQuery", dataType = "EmpSocChangesQuery", value = "员工社保公积金调整记录查询参数", paramType = "query")
    })
    Result<Page<EmpSocChangesListVO>> page(EmpSocChangesQuery empSocChangesQuery);

    /**
     * 根据员工id查询员工社保信息
     * @param empId 员工id
     * @return 员工社保记录详情
     */
    @ApiOperation(value="根据员工id查询员工社保信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empId", dataType = "String", value = "员工id", paramType = "query")
    })
    Result<EmpSocChangesVO> getEmpSocBasicByEmpId(String empId);

    /**
     * 社保公积金个税扣款计算
     * @param attendanceMonthlyAddDTO 员工考勤月统计参数
     * @return page
     */
    @ApiOperation(value="社保公积金个税扣款计算")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceMonthlyAddDTO", dataType = "AttendanceMonthlyAddDTO", value = "社保公积金个税扣款计算", paramType = "body")
    })
    Result<Boolean> empSocPfPersonTaxDedCount(@Valid @RequestBody AttendanceMonthlyAddDTO attendanceMonthlyAddDTO);


}

